<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<!-- COMMON TAGS -->
	<title>{{ .Title }}</title>
	<!-- Search Engine -->
	<meta name="description" content="{{ .Description }}">
	<meta name="image" content="{{ $.Param "image" }}">
	<!-- Schema.org for Google -->
	<meta itemprop="name" content="{{ .Title }}">
	<meta itemprop="description" content="{{ .Description }}">
	<meta itemprop="image" content="{{ $.Param "image" }}">
	<!-- Open Graph general (Facebook, Pinterest & Google+) -->
	<meta name="og:title" content="{{ .Title }}">
	<meta name="og:description" content="{{ .Description }}">
	{{ if $.Param "image" }}<meta name="og:image" content="{{ .Site.BaseURL}}{{ $.Param "image" }}">{{ end }}
	<meta name="og:url" content="{{ .Permalink }}">
	<meta name="og:site_name" content="{{ .Title }}">
	<meta name="og:type" content="article">
	<!-- Open Graph - Article -->
	<meta name="article:tag" content="{{ range .Params.tags }}{{.}} {{end}}">
	<link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}css/style{{ $.Site.Params.style }}.css">
	<link rel="alternate stylesheet" type="text/css" title="Dark theme" href="{{ .Site.BaseURL }}css/dark.css">

    <!-- If you passed the following variable through the partialCache, indicate this file is not to be indexed -->
    {{ if .Scratch.Get "nofollow"}}
        <meta name="robots" content="noindex,nofollow">
    {{ end }}

	<!-- Google Analytics -->
	{{ template "_internal/google_analytics_async.html" . }}
	<!-- highlight.js -->
	<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css">
	<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>

    <!-- JQuery -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
    <script type="text/javascript" src="/scripts/webmention.js"></script> 

    <script>hljs.initHighlightingOnLoad();</script>
    <script async src="https://www.google.com/recaptcha/api.js"></script>
    <script src="{{ .Site.BaseURL }}scripts/changetheme.js"></script>
    <script>set_style_from_cookie()</script>
    <!-- indieauth -->
    <link rel="authorization_endpoint" href="https://indieauth.com/auth">
    <!-- webmentions -->
    <link rel="webmention" href="https://webmention.io/www.edwinwenink.xyz/webmention" />
    <link rel="pingback" href="https://webmention.io/www.edwinwenink.xyz/xmlrpc" />
	<!-- Micropub endpoints -->
	<link href="https://sitewriter.net/www.edwinwenink.xyz/micropub" rel="micropub">
	<link rel="authorization_endpoint" href="https://indieauth.com/auth">
	<link rel="token_endpoint" href="https://tokens.indieauth.com/token">
    <!-- Icons -->
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.10.0/css/all.css" crossorigin="anonymous"/>
</head>

<body>

<header>
	<!-- Homepage Title -->
	<a href="{{ .Site.BaseURL }}"><strong><i class="fa fa-home"></i></strong></a>
	<!-- Navigation Pages -->
    <!-- TODO this broke after updating to 0.71; why does "authors" not show? -->
	{{ range $.Site.Params.navigation }}
        &nbsp;&nbsp;
        {{ with $.Site.GetPage . }}
            <a href="{{ lower .Permalink }}"><strong> {{ title .Title }}</strong></a>
        {{ end }}
    {{ end }}
    <!--
    <a href="{{ .Site.BaseURL }}etc/etc"><strong>etc</strong></a>
    &nbsp;&nbsp;
    <a href="{{ .Site.BaseURL }}authors/"><strong>authors</strong></a>
    -->
	<!-- Show RSS feed in the header -->
	<a href="{{ .Site.BaseURL }}index.xml" style="float: right;"><strong><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg></strong></a>

	<!-- Button to toggle dark theme -->
	<label class="switch" style="float: right;">
		<input type="checkbox" onclick="switch_style();" name="theme" id="Dark theme">
		<span class="slider"></span>
	</label>
</header>
